package cn.com.surker.production.entity.vo;

import cn.com.surker.util.StringUtils;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;

import java.util.Arrays;
import java.util.List;

/**
 * 用于调度查看的模型页面
 *
 * @author luotao
 * @date 2025/3/14
 */
@Data
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
public class ProductionIndentDisVo extends ProductionIndentVo {

	/**
	 * 任务单的发货方量
	 */
	private Double sendStere;

	/**
	 * 任务单的累计车次
	 */
	private Integer totalCar;

	/**
	 * 正在运输中的车辆
	 */
	private String carCodes;

	private List<String> carCodeList;

	public List<String> getCarCodeList() {
		if (StringUtils.isNotBlank(carCodes)) {
			String[] split = carCodes.split(",");
			carCodeList = Arrays.asList(split);
		}
		return carCodeList;
	}

	/**
	 * 任务单的生产线
	 */
	private String lineNames;

	private List<String> lineNameList;

	public List<String> getLineNameList() {
		if (StringUtils.isNotBlank(lineNames)) {
			String[] split = lineNames.split(",");
			lineNameList = Arrays.asList(split);
		}
		return lineNameList;
	}
}
